<?php

namespace libs\qoy\Exception;

use libs\qoy\Translator;

/**
 * ExceptionInternalServerError 服务器运行异常错误
 * @param int $code 错误代码
 * @param mixed $message  附加消息
 */
class ExceptionInternalServerError extends ExceptionCode {

    /**
     * 
     * @var int 错误的拦截器
     */
    const FILTER = 1;

    /**
     * @var int 类型没有找到
     */
    const CLASS_NOT_FOUND_EXCEPTION = 99;

    /**
     * @var int 不是SESSION_HANDLER子类
     */
    const ERROR_SESSION_HANDLER = 97;

    /**
     * @var int 没有安装MEMCACHE
     */
    const SUPPORT_MEMCACHE = 98;

    /**
     * @var int 没有安装MEMCACHE
     */
    const SUPPORT_MEMCACHED = 96;

    /**
     * @var int 配置错误
     */
    const CONFIG_ERRER = 95;

   
    /**
     * @var int key为空
     */
    const KEY_UNDEFINED = 94;

    /**
     * MCRYPT_MODULE_OPEN
     */
    const MCRYPT_MODULE_OPEN = 93;

    /**
     * @var int TABLES_SHOULD_NOT_BE_EMPTY
     */
    const TABLES_SHOULD_NOT_BE_EMPTY = 92;

    /**
     * @var int FILE_EXPIRE_IS_TOO_LARGE
     */
    const FILE_EXPIRE_IS_TOO_LARGE = 91;

    /**
     * NOT_SUPPORT_REDIS
     */
    const NOT_SUPPORT_REDIS = 90;

      /**
     * @var int 验证条件字段名为必需
     */
    const MISS_NAME_FOR_RULE=87;

    /**
     * No table map config for {tableName}
     */
    const NO_TABLE_MAP_CONFIG = 86;

    /**
     * no such db:{db} in servers
     */
    const NO_SUCH_DB_IN_SERVERS = 85;

    /**
     * can not connect to database:{db}
     */
    const CAN_NOT_CONNECT_TO_DATABASE = 84;

    /**
     * No db router match for {tableName}
     */
    const NO_DB_ROUTER_MATCH_FOR_TABLE = 83;

    /**
     * Database_connection_error
     */
    const DATABASE_CONNECTION_ERROR = 82;

    /**
     * 构造方法
     * @param int $code 错误代码
     * @param mixed $errerdata 错误数据
     * 
     */
    public function __construct($code = 0, $errerdata = "") {
        parent::__construct("服务器运行异常", 500 + $code, $errerdata);
    }

}
